class MenusController < ApplicationController
  def index
    @menus = Menu.find(:all)
  end

  def new
    @menu = Menu.new
  end

  def edit
    @menu = Menu.find(params[:id])
  end

  def show
  end

  def create
    @menu = Menu.new(params[:menu])
    @menu.save
    
    redirect_to menus_url
  end

  def update
    @menu = Menu.find(params[:id])
    
    respond_to do |format|
      if @menu.update_attributes(params[:menu])
        format.html { redirect_to (menus_url) }
      else
        format.html { render :action => "edit" }
      end
    end
  end

  def destroy
    @menu = Menu.find(params[:id])
    @menu.destroy
    
    redirect_to menus_url
  end

end
